import { SWIPER_EFFCE, PAGE_MODE_MAP, DEFAULT_MEDIAS, MOBILE_WID_HEI, H5_TYPE, PAGE_TYPE, BG_POSITION_REPEAT_TYPES_MAP } from '@/const/'
import { PRODUCT_TYPE, PAGE_TYPE_ } from '@/const/web/'

const baseUrl  = import.meta.env.VITE_APP_WEB_URL

export const PageAttr = {
  id: 1,
  type: PAGE_TYPE_.page, //普通页面 2pop页面
  components: [],
  attrs: {
    width: MOBILE_WID_HEI.width,
    height: MOBILE_WID_HEI.height,
    bgUrl: "",
    backgroundColor: '',
    bgPositionRepeatType: BG_POSITION_REPEAT_TYPES_MAP.centerTop,
    isAutoClose: false,
    delayTime: 0,
    isPopUseSiteBg: false,
  },
  isActive: false,
}
export const ShareAttr = {
  allShare: {
    title: '我的作品',
    desc: '描述',
  },
  wxShare: {
    title: '',
    desc: '',
    key: '',
  },
  wbShare: {
    title: '',
    desc: '',
  },
  bIsWxChecked: false,
  bIsWbChecked: true,
  icon: DEFAULT_MEDIAS.icon,
};

export const SiteAttr = {
  id: 1,
  attrs: {
    width: MOBILE_WID_HEI.width,
    height: MOBILE_WID_HEI.height,
    bgUrl: "",
    backgroundColor: '',
    bgPositionRepeatType: BG_POSITION_REPEAT_TYPES_MAP.centerTop,
    isAutoClose: false,
    delayTime: 0,
    isPopUseSiteBg: false,
    isNoSwiping: true, //单页也不使用swiper
    swiper: { turnPageMode: PAGE_MODE_MAP.top_down, autoTurnPage: false, turnPageTime: 0.5,  effect: SWIPER_EFFCE[0].value, swiperHintUrl: '', noSwipings: '', isTurnPage: false },
    isRandomEffect: false,
    isPopRandomEffect: false,
    h5Type: H5_TYPE.mobile, //普通dom页面还是canvas页面
    pageType: PAGE_TYPE.single, //1 多页 2 长页
    pageId: 1,
    popId: 0,
    isOffline: false, //前端站点下线
    push_visible: false, //公开发送博文
    swiperHintUrl: '', //swiper向下箭头url
    isDisplayDebuggerText: false,
    noSwipings: '',
    loadAssets: '',//进入页面前需要加载的素材
    productType: PRODUCT_TYPE[0].value,
    isDisplayAssetsLoading: false,
    controlData: '',//站点自定义信息
    isShareWeiboWinxin: false,//分享到微博或是微信
    reloadTime: 50,
    share: ShareAttr,//_.cloneDeep(ShareAttr),

    wx_appkey: '',
    wx_appsecret: '',
    wb_appkey: '',
    wb_appsecret: '',
    bIsWbAppkeyChecked: true,
    key: '',
    thumb: baseUrl + 'images/default-thumb.png',
    sdate:'',
    edate:'',
    isNotSaveImg: false // 全局设置是否长按保存图片（默认是可以长按保存的）
  },
}
